<div class="path">
    <i class="iconfont icon-shouye1"></i>
    <a href="{url('admin/default/welcome')}">开始</a> / 
    <a href="{url('service/index')}">维修任务</a>
</div>
<div class="table-head fn-clear">
    <div class="fn-l">
        <a href="{url('service/index')}" class="button">
            <i class="iconfont icon-xiangzuo1"></i> 返回
        </a>
    </div>
</div>
<div class="m10">
<div class="tipbox tipbox-wait">
    <div class="tipbox-icon"><i class="iconfont icon-jinggao1"></i></div>
    <div class="tipbox-content"><h3 class="tipbox-title">友情提示：<span class="red">IMEI号:{$info['imei']}产品已过保,需要重新确认判断是否过保。</span></h3></div>
</div>
</div>
<div class="m10">
<form id="form" action="{url('service/overtime')}">
<input type="hidden" name="id" value="{$id}"/>   
  <table class="formtable">
    <tr>
      <th class="w80">IMEI号:</th>
      <td colspan="3">{$info['imei']}</td>
    </tr>
    <tr>
      <th class="w80">购买日期:</th>
      <td>{date('Y-m-d',$info['shop_time'])}</td>
    </tr>
    <tr>
      <th class="w80">门店受理日期:</th>
      <td>{date('Y-m-d',$info['accept_time'])}</td>
    </tr>
    <tr>
      <th class="w80">使用天数:</th>
      <td>
      <?php 
        $times = $info['accept_time']-$info['shop_time'];
        $today = $times/86400;
        echo ceil($today);
      ?>天</td>
    </tr>
    <tr>
      <th>是否过保:</th>
      <td>{if $info['overtime'] == '是'}<span class="badge">保内</span>{else}<span class="badge bg-red">过保</span>{/if}</td>
    </tr>
    <tr>
      <th>故障描述:</th>
      <td colspan="3">{$info['fault_why']}</td>
    </tr>
    <tr>
      <th>实际故障:</th>
      <td colspan="3">{$info['failure_cause']}</td>
    </tr>
    <tr>
      <th>建议维修方式:</th>
      <td colspan="3">{$info['service_mode']}</td>
    </tr>
    <tr>
      <th>是否包内:</th>
      <td colspan="3">
        <input datatype="*" type="radio" name="is_overtime" value="1" />保内&nbsp;&nbsp;
        <input type="radio" name="is_overtime" value="0" />过保
      </td>
    </tr> 
    <tr class="is_shoptime fn-hide">
      <th>购机日期:</th>
      <td colspan="3">
        <input class="input w150 ui-date" type="text" name="shop_time" value="" readonly="readonly" /> 重新输入购机日期,有系统判断是否包内
        <span class="Validform_checktip"></span>
      </td>
    </tr>
    <tr class="is_rmb fn-hide">
      <th>包外付费维修:</th>
      <td colspan="3">
        <input type="radio" name="is_rmb" value="1" />付费&nbsp;&nbsp;
        <input type="radio" name="is_rmb" value="0" />不维修
        <span class="Validform_checktip"></span>
      </td>
    </tr> 
  </table>
  <div class="btn fn-tac">
    <input type="submit" value="确认重新授权" class="button button-blue" />
  </div>
</form>
</div>
<script type="text/javascript">
Do('base','form','date','dialog',function(){ 
    $('#form').forms();
    $("input:radio[name='is_overtime']").click(function(){
        var is_overtime = $('input:radio[name="is_overtime"]:checked').val();
        if(is_overtime == 1){
            $(".is_shoptime").show();
            $(".is_rmb").hide();
            $("input:text[name='shop_time']").attr("datatype","date");
            $("input:radio[name='is_rmb']").removeAttr("datatype","*");
        }else{
            $(".is_shoptime").hide();
            $(".is_rmb").show();
            $("input:radio[name='is_rmb']").attr("datatype","*");
            $("input:text[name='shop_time']").removeAttr("datatype","date");
        }
    });
  
})
</script>